package EjemplosEventosBasicos;

import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

import oracle.jdeveloper.layout.XYConstraints;
import oracle.jdeveloper.layout.XYLayout;


public class EjemploXYLayout {
	public void montarVentana(){
		JFrame frame = new JFrame("XY Layout");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JPanel panel = new JPanel();
		panel.setLayout(new XYLayout());
		
		JButton boton = new JButton("Boton1");
		JButton boton2 = new JButton("Boton2");
		JButton boton3 = new JButton("Boton3");
		
		panel.add(boton, new XYConstraints(0,0,100,75));
		panel.add(boton2, new XYConstraints(36,100,300,150));
		panel.add(boton3, new XYConstraints(15,260,450,100));
		
		frame.setPreferredSize(new Dimension(500,500));
		frame.add(panel);
		frame.setVisible(true);
		frame.pack();
		
		
	}
	
	public static void main( String[] args){
		EjemploXYLayout exyl = new EjemploXYLayout();
		exyl.montarVentana();
	}
}
